import { MessageOperator } from "./message";
import { LoadingOperator } from "./loading";
import { ConfirmDialogOperator } from "./confirm";

/**
 * 操作管理类（用于存储操作示例）
 */
export interface IOperatorManager {
  /**
   * 设置消息框操作类实例
   * @param operator 消息框操作实例
   */
  setMessageOperator(operator: MessageOperator): IOperatorManager;

  /**
   * 获取消息框操作实例
   */
  getMessageOperator(): MessageOperator;

  /**
   * 设置Loading操作实例
   * @param operator Loading操作实例
   */
  setLoadingOperator(operator: LoadingOperator): IOperatorManager;

  /**
   * 获取Loading操作实例
   */
  getLoadingOperator(): LoadingOperator;

  /**
   * 设置确认框操作实例
   * @param operator 确认框操作实例
   */
  setConfirmOperator(operator: ConfirmDialogOperator): IOperatorManager;

  /**
   * 获取确认框操作实例
   */
  getConfirmOperator(): ConfirmDialogOperator;
}

const OperatorManager: IOperatorManager = {
  getConfirmOperator(): ConfirmDialogOperator {
    throw new Error("not impl");
  },
  getLoadingOperator(): LoadingOperator {
    throw new Error("not impl");
  },
  getMessageOperator(): MessageOperator {
    throw new Error("not impl");
  },
  setConfirmOperator(operator: ConfirmDialogOperator): IOperatorManager {
    throw new Error("not impl");
  },
  setLoadingOperator(operator: LoadingOperator): IOperatorManager {
    throw new Error("not impl");
  },
  setMessageOperator(operator: MessageOperator): IOperatorManager {
    throw new Error("not impl");
  },
};

export { OperatorManager };
